<template>
	<view class="content">

		<view class="radius shadow-warp bg-black" style="width: 100%;height: 420rpx; padding: 0;">
			<image src="@/static/banner.png" mode="widthFix" class="response"></image>
			<text class="title" style="position: absolute; top: 88rpx; left: 30rpx; color: white; font-size: 30rpx;">唐山高新区作风效能评价系统</text>
			<text class="title" style="position: absolute; top: 150rpx; left: 50rpx; color: white; font-size: 38rpx;">下午好！</text>
			<text class="title" style="position: absolute; top: 210rpx; left: 60rpx; color: white; font-size: 28rpx;">多云 3 ℃</text>
			<text class="title" style="position: absolute; top: 320rpx; right: 45rpx; color: white; font-size: 32rpx;">创新、开放、唯实、争先</text>
			
			<!-- <view class="u-demo-block__content" style="margin-top: -80rpx; position: absolute; width: 100%;">
				<view class="u-page__tag-item">
					<u-search placeholder="请输入搜索内容" bg-color="white" search-icon-size="32rpx" margin="35rpx"
						height="70rpx" search-icon="scan" search-icon-color="rgb(80,134,200)" :show-action="false">
					</u-search>
				</view>
			</view> -->
			<view class="cu-bar search "style="margin-top: -60rpx; position: absolute; width: 100%;">
				<view class="search-form round basis-xl " style="background-color: white;">
					<text class="cuIcon-scan text-blue" @tap="sanCode"></text>
					<input @focus="InputFocus" @blur="InputBlur" :adjust-position="false" type="text" placeholder="请输入搜索内容" confirm-type="search" @tap="searchClick"></input>
				</view>
			</view>
		</view>
		<view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
			<navigator class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<gridCol*2"
				style="flex-direction: row; margin-top:20rpx;" :url="item.url">
				<image :src="item.cuIcon" class="png" mode="aspectFit"></image>
				<text class="text-right1" style="font-size: 38rpx;
		font-weight: bold; color: black;">{{item.name}}</text>
			</navigator>
		</view>

		<view class="hot-aq">
			<view class="cu-bar bg-white solid-bottom margin-top radius">
				<view class="action">
					<text class="cu-modal"></text> 热门回答
				</view>
			</view>
			<view class="cu-list menu" :class="['col-' + gridCol,gridBorder?'':'no-border']">
				<view class="cu-item" v-for="(item,index) in cuIconList" :key="index" v-if="index<gridCol*2"
					style="flex-direction: column; align-items: normal;">
					<view class="" style="display: flex; flex-direction: row;"> 
						<image src="@/static/question-circle-fill.png" class="hot-aq-img-top" ></image>
						<text class="text-top" style="font-size: 32rpx; color: black; margin-top: 8rpx; padding-left: 48rpx;">{{item.name}}</text>
					</view>
					<view class="" style="display: flex; flex-direction: row;">
						<image src="@/static/warning-circle-fill.png" class="hot-aq-img-bottom" mode=""></image>
						<text class="text-bottom" style="font-size: 26rpx; color: rgb(135,135,135); margin-bottom: 13rpx; padding-left: 48rpx ; white-space:nowrap; overflow: hidden; text-overflow:ellipsis;">很长的字符很长的字符很长的字符很长的字符很长的字符很长的字符很长的字符很长的字符</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cuIconList: [{
					cuIcon: 'https://mp-eb08f59e-b635-43fb-81b2-8ff3f5ccee36.cdn.bspapp.com/cloudstorage/4b64a8fc-195e-4207-b55e-ce78af7debc7.png',
					color: 'red',
					url: '/pages/myEvaluate/myEvaluate',
					name: '作风评价'
				}, {
					cuIcon: 'https://mp-eb08f59e-b635-43fb-81b2-8ff3f5ccee36.cdn.bspapp.com/cloudstorage/2ebcdc5f-903c-4112-b226-ecda3292e8c8.png',
					color: 'orange',
					url: '',
					name: '预约办事'
				}, {
					cuIcon: 'https://mp-eb08f59e-b635-43fb-81b2-8ff3f5ccee36.cdn.bspapp.com/cloudstorage/cd92aac9-4213-4295-8737-52bf7a6eb345.png',
					color: 'yellow',
					url: '/pages/processMonitoring/processMonitoring',
					name: '能效追踪'
				}, {
					cuIcon: 'https://mp-eb08f59e-b635-43fb-81b2-8ff3f5ccee36.cdn.bspapp.com/cloudstorage/677c6180-011a-47de-b90a-a51e2ebc24f5.png',
					color: 'olive',
					url: '/pages/suggest/suggest',
					name: '投诉建议'
				}],
				modalName: null,
				gridCol: 2,
				gridBorder: false,
				menuBorder: false,
				menuArrow: false,
				menuCard: false,
				skin: false,
				listTouchStart: 0,
				listTouchDirection: null,
			}
		},
		//onload相当于viewdidload
		onLoad() {

		},
		methods: {
			clickAction() {
				console.log(22222);
				uni.navigateTo({
					url: "/pages/login/login"
				})
			},
			sanCode() {
				uni.navigateTo({
					url: "/pages/scanPage/scanPage"
				})
			},
			searchClick() {
				uni.navigateTo({
					url:"/pages/searchResult/searchResult"
				})
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background-color: rgb(239, 242, 249);
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}

	.cu-list.grid {
		height: 390rpx;
		width: 680rpx;
		display: flex;
		border-radius: 15rpx;
		margin-left: 35rpx;
		margin-right: 35rpx;
		margin-top: 55rpx;
	}

	.png {
		margin-left: 50rpx;
		width: 120rpx;
		height: 120rpx;
	}

	.text-right1 {
		width: 76rpx;
		margin-left: 30rpx;
	}

	.hot-aq {
		width: 680rpx;
		margin-left: 35rpx;
		margin-right: 35rpx;
		margin-top: -10rpx;
	}
	
	.hot-aq-img-top {
		width: 35rpx; 
		height: 35rpx;
		margin-top: 13rpx;
		position: absolute;
	}
	
	.hot-aq-img-bottom {
		width: 35rpx; 
		height: 35rpx;
		margin-bottom: 13rpx;
		position: absolute;
	}
	
</style>